#!/bin/bash

yt=`date -d "1 days ago "  "+%Y-%m-%d"`
mysql -uroot -proot -hhadoop3<<EOF  
use result;

delete from res_notoilTop where minutes>='$yt';
delete from res_notoilTop_vip where minutes>='$yt';
truncate table res_oilPrice;
truncate table res_notoilDepartment_vip;
EOF
exit;
